{include file="index/head" /} 
<script src="/public/ueditor/ueditor.config.js"></script> 
<script src="/public/ueditor/ueditor.all.js"></script> 
<div class="box auto">
  <div class="box-head">
    <ul class="bhtab">
      <li class="on"><a href="javascript:void(0)"><i class="icon-comment"></i> 网站信息</a></li>      
      <li><a href="javascript:void(0)"><i class="icon-phone-square"></i> 联系信息</a></li>
      <li><a href="javascript:void(0)"><i class="icon-desktop"></i> 站点配置</a></li>
      <li><a href="javascript:void(0)"><i class="icon-tablet"></i> 移动端配置</a></li>
      <li><a href="javascript:void(0)"><i class="icon-dot-circle-o"></i> 小程序配置</a></li>
      <li><a href="javascript:void(0)"><i class="icon-envelope"></i> 邮箱配置</a></li>      
    </ul>
  </div>
  <div class="form">
    <form method="post" action="{:url('updateConfig')}" class="sycmsform" data-type="ajax">
      <!-- 网站信息 -->
      <ul class="tabcon" style="display:block">
        <li>
          <label>网站标题：</label>
          <div class="item">
            <input type="text" name="webtitle" value="{$v.webtitle}" datatype="*" nullmsg="请输入网站标题" class="input w60"/>
          </div>
        </li>
        <li>
          <label>网站LOGO：</label>
          <div class="item">
            <input type="text" name="weblogo" value="{$v.weblogo}" class="input"/>
            <button type="button" class="button fl" onclick="sycms.showupload(this)" id="image1" at="dg"><i class="icon-plus"></i>浏览上传</button>
            <div class="clear"></div>
            <div class="input-image">{if $v.weblogo}<img src="{$v.weblogo}" alt="" />{/if}</div>
          </div>
        </li>
        <li>
          <label>网站域名：</label>
          <div class="item">
            <input type="text" name="weburl" value="{$v.weburl}" datatype="*" nullmsg="请输入网站域名" class="input"/>
            <span class="tips">必填 例如：http://www.xxx.cn/ 后面加上斜杠</span> </div>
        </li>
        <li>
          <label>网站关健字：</label>
          <div class="item">
            <input type="text" name="webkeywords" value="{$v.webkeywords}" class="input w100"/>
          </div>
        </li>
        <li>
          <label>网站描述：</label>
          <div class="item">
            <textarea name="webdescription" class="input w100" style="height:70px; margin-bottom:12px;">{$v.webdescription}</textarea>
          </div>
        </li>
        <li>
          <label>版权信息：</label>
          <div class="item"> 
            <script id="content" name="webcopyright" type="text/plain" style="width:100%;height:200px;">{$v.webcopyright}</script> 
            <script> var ue = UE.getEditor("content"); ue.ready(function() { ue.setHeight(200); });</script>
          </div>
        </li>
      </ul>

         
      <!-- 联系信息 -->
      <ul  class="tabcon">
        <li>
          <label>公司名称：</label>
          <div class="item">
            <input type="text" name="contact_company" value="{$v.contact_company}" class="input"/>
          </div>
        </li>
        <li>
          <label>联系人：</label>
          <div class="item">
            <input type="text" name="contact_name" value="{$v.contact_name}" class="input"/>
          </div>
        </li>
        <li>
          <label>手机号：</label>
          <div class="item">
            <input type="text" name="contact_mobile" value="{$v.contact_mobile}" class="input"/>
          </div>
        </li>
        <li>
          <label>座机：</label>
          <div class="item">
            <input type="text" name="contact_tel" value="{$v.contact_tel}" class="input"/>
          </div>
        </li>
        <li>
          <label>400电话：</label>
          <div class="item">
            <input type="text" name="contact_400" value="{$v.contact_400}" class="input"/>
          </div>
        </li>
        <li>
          <label>传真：</label>
          <div class="item">
            <input type="text" name="contact_fax" value="{$v.contact_fax}" class="input"/>
          </div>
        </li>
        <li>
          <label>QQ：</label>
          <div class="item">
            <input type="text" name="contact_qq" value="{$v.contact_qq}"  class="input"/>
          </div>
        </li>
        <li>
          <label>邮箱：</label>
          <div class="item">
            <input type="text" name="contact_email" value="{$v.contact_email}"  class="input"/>
          </div>
        </li>
        <li>
          <label>地址：</label>
          <div class="item">
            <input type="text" name="contact_address" value="{$v.contact_address}"  class="input"/>
          </div>
        </li>
        <li>
          <label>微信二维码：</label>
          <div class="item">
            <input type="text" name="contact_ewm" value="{$v.contact_ewm}" class="input"/>
            <button type="button" class="button fl" onclick="sycms.showupload(this)" id="image2" at="dg"><i class="icon-plus"></i>浏览上传</button>
            <div class="clear"></div>
            <div class="input-image">{if $v.contact_ewm}<img src="{$v.contact_ewm}" alt="" />{/if}</div>
          </div>
        </li>
        <li>
          <label>地图坐标：</label>
          <div class="item">
            <input type="text" name="contact_latlng" value="{$v.contact_latlng}"  class="input"/>
            <a class="button fl" href="http://api.map.baidu.com/lbsapi/getpoint/index.html" target="_blank"><i class="icon-mail-forward (alias)"></i>获取坐标</a> </div>
        </li>
      </ul>
      
      <!-- 站点配置 -->
      <ul  class="tabcon">
         <li>
          <label>网站状态：</label>
          <div class="item">
            <input type="hidden" value="{$v.webstatus|default=1}" name="webstatus" />
            <div class="switch {if condition='$v.webstatus == 1'}on{/if}" id="closeweb"><em ontxt="打开" offtxt="关闭">{if condition='$v.webstatus==1'}打开{else/}关闭{/if}</em><i></i></div>
          </div>
        </li>
        <li style="{if condition='$v.webstatus eq 1'}display:none;{else/}display:block;{/if}" id="webclosedesc">
          <label>网站关闭说明：</label>
          <div class="item">
            <textarea name="webclosedesc" class="input w100" style="height:80px; margin-bottom:12px;">{$v.webclosedesc}</textarea>
          </div>
        </li>
        <li>
          <label>后台风格：</label>
          <div class="item">
            <div class="select"><i class="icon-caret-down"></i>
              <input type="hidden" name="webadminstyle" value="{$v.webadminstyle}" class="inputval" />
              <input type="text" readonly="readonly" class="input"/>
              <dl class="select-value syui-anim syui-anim-up">
                <dd data="default" class="{$v.webadminstyle=='default'?'selected':''}">默认</dd>
                <dd data="black" class="{$v.webadminstyle=='black'?'selected':''}">极酷黑</dd>
                <dd data="green" class="{$v.webadminstyle=='green'?'selected':''}">极酷绿</dd>
              </dl>
            </div>
            <span class="tips">更换后请刷新</span> </div>
        </li>
        <li>
          <label>URL形式：</label>
          <div class="item radio">
            <span><input type="radio" name="weburltype" value="0" {if condition="$v.weburltype eq 0"}checked="checked"{/if} /> 伪静态</span>
            <span><input type="radio" name="weburltype" value="1" {if condition="$v.weburltype eq 1"}checked="checked"{/if} /> 纯静态</span>
            <span style="color:#999;">伪静态浏览请删除根目录index.html</span>
          </div>
        </li>
         <li>
          <label>静态存储目录：</label>
          <div class="item">
            <input type="text" name="webhtmlpath" value="{$v.webhtmlpath}" class="input w50"/>
            <span class="tips">为空则生成到根目录</span>
          </div>
        </li>
        <li>
          <label>默认首页：</label>
          <div class="item">
            <input type="text" name="webindexname" value="{$v.webindexname}" class="input w50"/>
            <span class="tips">默认首页生成静态文件名</span>
          </div>
        </li>
        <!--li>
          <label>默认模板：</label>
          <div class="item">
            <div class="select"><i class="icon-caret-down"></i>
              <input type="hidden" name="webthemes" value="{$v.webthemes}" class="inputval" />
              <input type="text" readonly="readonly" class="input"/>
              <dl class="select-value syui-anim syui-anim-up">
                {volist name="tplist" id="vo"}
                <dd data="{$vo.file}" class="{$v.webthemes==$vo.file?'selected':''}">{$vo.file}</dd>
                {/volist}
              </dl>
            </div>
          </div>
        </li-->
      </ul>
      
      <!-- 手机版配置 -->
      <ul  class="tabcon">
         <li>
          <label>是否开启移动端：</label>
          <div class="item">
            <input type="hidden" value="{$v.webmstatus|default=1}" name="webmstatus" />
            <div class="switch {if condition='$v.webmstatus == 1'}on{/if}" id="closeweb"><em ontxt="开启" offtxt="关闭">{if condition='$v.webmstatus==1'}开启{else/}关闭{/if}</em><i></i></div>
            <span class="tips">若站点为纯静态时，若静态存储目录为空，则必须生成静态</span>
          </div>
        </li>
        <li>
          <label>静态生成目录：</label>
          <div class="item">
            <input type="text" name="webmhtmlpath" value="{$v.webmhtmlpath}" class="input w50"/>
            <span class="tips">移动端静态生成目录，默认为m目录</span>
          </div>
        </li>
        <li>
          <label>绑定域名：</label>
          <div class="item">
            <input type="text" name="webmurl" value="{$v.webmurl}" class="input w50"/>
            <span class="tips">如： m.xxx.com 或 m.xxx.com 注：为空则为主域名访问。 </span>
          </div>
        </li>
      </ul>
      
      
      <!-- 小程序配置 -->
      <ul class="tabcon">
        <li>
          <label>小程序APPID：</label>
          <div class="item">
            <input type="text" name="appid" value="{$v.appid}" nullmsg="请输入小程序appid" class="input" />
          </div>
        </li>
        <li>
          <label>小程序APPSECRET：</label>
          <div class="item">
            <input type="text" name="appsecret" value="{$v.appsecret}" nullmsg="请输入app_sccret" class="input" />            
          </div>
        </li>
        <li>
          <label>支付商家号：</label>
          <div class="item">
            <input type="text" name="merchantid" value="{$v.merchantid}" nullmsg="请输入支付商户号" class="input" />
          </div>
        </li>
        <li>
          <label>支付密钥KEY：</label>
          <div class="item">
            <input type="text" name="appkey" value="{$v.appkey}" nullmsg="请输入支付密钥KEY" class="input" />
            
          </div>
        </li>
        <li>
          <label>支付回调地址：</label>
          <div class="item">
            <input type="text" name="paynotify" value="{$v.paynotify}" nullmsg="请输入支付回调地址" class="input" />
          </div>
        </li>
        <li>
          <label>apiclient_cert地址:</label>
          <div class="item">
            <input type="text" name="apiclientcert" value="{$v.apiclientcert}" nullmsg="请输入支付回调地址" class="input" />
          </div>
        </li>
        <li>
          <label>apiclient_key地址:</label>
          <div class="item">
            <input type="text" name="apiclientkey" value="{$v.apiclientkey}" nullmsg="请输入支付回调地址" class="input" />
          </div>
        </li>
      </ul>
      
      <!-- 邮箱配置 -->
      <ul class="tabcon">
        <li>
          <label>收件人：</label>
          <div class="item">
            <input type="text" name="email_form_name" value="{$v.email_form_name}" class="input"/>
          </div>
        </li>
        <li>
          <label>收件人邮箱地址：</label>
          <div class="item">
            <input type="text" name="email_form" value="{$v.email_form}" class="input"/>
          </div>
        </li>
        <li>
          <label>STMP服务器：</label>
          <div class="item">
            <input type="text" name="email_host" value="{$v.email_host}" class="input">
          </div>
        </li>
        <li>
          <label>连接方式：</label>
          <div class="item">
            <div class="select"><i class="icon-caret-down"></i>
              <input type="hidden" name="email_smtpsecure" value="{$v.email_smtpsecure}" class="inputval" />
              <input type="text" readonly="readonly" class="input"/>
              <dl class="select-value syui-anim syui-anim-up">
                <dd data="" 	 class="{$v.email_smtpsecure==''?'selected':''}" >默认</dd>
                <dd data="ssl" class="{$v.email_smtpsecure=='ssl'?'selected':''}" >ssl</dd>
                <dd data="tls" class="{$v.email_smtpsecure=='tls'?'selected':''}" >tls</dd>
              </dl>
            </div>
          </div>
        </li>
        <li>
          <label>SMTP服务器端口：</label>
          <div class="item">
            <input type="text" name="email_port" value="{$v.email_port}"  class="input"/>
          </div>
        </li>
        <li>
          <label>发件箱帐号：</label>
          <div class="item">
            <input type="text" name="email_send_name" value="{$v.email_send_name}" class="input"/>
          </div>
        </li>
        <li>
          <label>发件箱授权码：</label>
          <div class="item">
            <input type="password" name="email_send_pass" value="{$v.email_send_pass}" class="input"/>
          </div>
        </li>
        <li>
          <label>留言是否发送邮件：</label>
          <div class="item">
            <input type="hidden" value="{$v.email_issend|default=1}" name="email_issend" />
            <div class="switch {if condition='$v.email_issend == 1'}on{/if}" id="closeweb"><em ontxt="是" offtxt="否">{if condition='$v.email_issend==1'}是{else/}否{/if}</em><i></i></div>
          </div>
        </li>
      </ul>
      <ul>
        <li>
          <label>&nbsp;</label>
          <div class="item">
            <button type="submit" onclick="" class="button"><i class="icon-check"></i>提交</button>
          </div>
        </li>
      </ul>
    </form>
  </div>
</div>
<script>
sycms.submitform("{:url('info')}",true);
$(function(){
	$("#closeweb").click(function(){
		if($("input[name=webstatus]").val()==0){
			$("#webclosedesc").show();
		}else{
			$("#webclosedesc").hide();
		}
	})
	
	$(".bhtab li").click(function(){
		$(this).addClass("on").siblings().removeClass("on");
		$(".tabcon").hide().eq($(this).index()).show();
	})	
})
</script> 
